package com.ys.day27.p5自定义线程池;

/**
 * 描述: TODO
 *
 * @author CodeYang
 * @version 2021/1/7 1:04
 */
public class TestObject {

    private static  Integer index = null;

    /**
     *  这样通过静态技术返回的对象肯定是同一个
     * @return
     * @throws Exception
     */
    public  static  Integer creteObject() throws Exception{
        if (null == index){
            index = new Integer(7);
        }
        return index;
    }

}
